Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dpp 90 #144

Merged
merged 6 commits into from
Nov 27, 2023
Merged

Feature/dpp 90 #144

merged 6 commits into from
Nov 27, 2023

Conversation

sksadjad
Copy link
Contributor

added the ssi-sdk.core function for enablePostgresUuidExtension and exported it. also made data-store use it

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2023

Codecov Report

Attention: 951 lines in your changes are missing coverage. Please review.

Comparison is base (ba38097) 45.89% compared to head (be54098) 34.04%.
Report is 688 commits behind head on develop.

❗ Current head be54098 differs from pull request most recent head cb5d8cb. Consider uploading reports for the commit cb5d8cb to get more accurate results

Files Patch % Lines
...es/issuance-branding/src/agent/IssuanceBranding.ts 0.00% 128 Missing ⚠️
...kages/data-store/src/statusList/StatusListStore.ts 5.40% 105 Missing ⚠️
...ages/contact-manager-rest-api/src/api-functions.ts 0.00% 93 Missing ⚠️
packages/agent-config/src/objectCreator.ts 0.00% 70 Missing ⚠️
...ckages/contact-manager/src/agent/ContactManager.ts 0.00% 53 Missing ⚠️
packages/data-store/src/contact/ContactStore.ts 78.53% 47 Missing ⚠️
...s/postgres/1685628974232-CreateIssuanceBranding.ts 4.34% 44 Missing ⚠️
packages/agent-config/src/dataSources.ts 0.00% 42 Missing ⚠️
...igrations/postgres/1690925872592-CreateContacts.ts 4.54% 42 Missing ⚠️
...manager-rest-api/src/contact-manager-api-server.ts 0.00% 38 Missing ⚠️
... and 23 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #144       +/-   ##
============================================
- Coverage    45.89%   34.04%   -11.85%     
============================================
  Files           65      139       +74     
  Lines         2412     6820     +4408     
  Branches       539     1615     +1076     
============================================
+ Hits          1107     2322     +1215     
- Misses        1305     4497     +3192     
- Partials         0        1        +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* It should accept queryRunner from the typeorm
*/
export const enablePostgresUuidExtension = async (queryRunner: any) => {
if (!queryRunner.query) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting choice. Why not simply expose query with an any in the type for querunner and have TS handle this for you. It means that at compile time you cannot pas in an object without a query param, so you do not have to check at runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified this to have a type which has query function

Copy link
Contributor

@nklomp nklomp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update tsconfig

…ry function to enablePostgresUuidExtension signature
@@ -2,19 +2,18 @@ export const flattenArray = <T>(args: { items: Array<T | Array<T>> }): Array<T>

export const flattenMigrations = <T>(args: { migrations: Array<T | Array<T>> }): Array<T> => args.migrations.flat() as Array<T>

/**
* It should accept queryRunner from the typeorm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay an now add the remark back to the type please, so people know you are creating a type that mimics TypeOrm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@sksadjad sksadjad merged commit 9e3fc6a into develop Nov 27, 2023
1 of 2 checks passed
@sksadjad sksadjad deleted the feature/DPP-90 branch November 27, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants